package com.ght.springboot.api.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @description:
 * @author: haitao.gao
 * @create: 2019-02-21 22:42
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ElasticSearchQuery<T> {

    private T must;

    private T should;

    private T mustNot;

    /**
     * 索引
     */
    private String index;

    /**
     * 类型
     */
    private String type;

    private Integer pageNo;

    private Integer pageSize;

    public ElasticSearchQuery(String index, String type, Integer pageNo, Integer pageSize){
        this.index = index;
        this.type = type;
        this.pageNo = pageNo;
        this.pageSize = pageSize;
    }

    public ElasticSearchQuery(String index, String type){
        this.index = index;
        this.type = type;
    }

}
